
#include <iostream>
#include "SimpleFactory.h"

using namespace npSimpleFactory;
using namespace std;

void doSimpleFactory()
{
    int firstNum = 3;
    int secondNum = 4;
    char sign = '+';

    sign = '+';
    shared_ptr<Operation> plus = SimpleFactory::createFactory(sign);
    plus->setNums(firstNum, secondNum);
    cout << "3 + 4 is " << plus->getResult() << endl;

    sign = '-';
    shared_ptr<Operation> sub = SimpleFactory::createFactory(sign);
    sub->setNums(firstNum, secondNum);
    cout << "3 - 4 is " << sub->getResult() << endl;
}
